<!DOCTYPE html>
<html>
<body style="background-color: #fee; font-family: 'courier new', monospace; font-size: 13px; word-wrap: break-word;" contenteditable>
<p id="description">This test ensures WebKit does not skip paragraphs when determining the insertion position for paste.<br>
You should see "hello world&lt;caret&gt; WebKit" below.</p>
<div id="test" contenteditable>
<font face="'courier new', monospace"><div style="font-family: arial;">
<span style="font-family: 'courier new', monospace;">hello</span></div>
<div style="font-family: arial; "><span style="font-family: 'courier new', monospace;">&nbsp;WebKit</span></div></font>
</div>
<script src="../editing.js"></script>
<script src="../../resources/dump-as-markup.js"></script>
<script>

Markup.description(document.getElementById('description').textContent);

moveSelectionForwardByLineBoundaryCommand();
Markup.dump('test', 'Initial markup');

insertHTMLCommand('<span style="background-color: #fee;">&nbsp;world</span>');
Markup.dump('test', 'After inserting " world"');

for (var i = 0; i < 5; i++) // Make sure we're at the very end.
    moveSelectionForwardByLineCommand();
moveSelectionBackwardByLineBoundaryCommand();

deleteCommand();
Markup.dump('test', 'After deleting line break before " WebKit"');

</script>
</body>
</html>
